<?php

class LinkComponent extends BlueprintComponent {
	
	function parse(&$element, $link, $addGetVars = false) {
		$doc = $element->document;
		if ($addGetVars) {
			$queryString = $_SERVER['QUERY_STRING'];
			if (strlen($queryString) > 1) {
				$link .= "?$queryString";
			}
		}
		$element->attributes["href"] = $link;
	}
}
?>